import React from "react";
import "./index.less";
import { useNavigate } from "@/.umi/exports";
import { NavBar } from "antd-mobile";
type Props = {
  title: string;
};
export default function CommonHead(props: Props) {
  const navigate = useNavigate();
  return (
    <div className="common-head">
      <NavBar
        onBack={() => {
          navigate(-1);
        }}
      >
        {props.title}
      </NavBar>
    </div>
  );
}
